Don't clobber xsi schema when merging.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 13 Apr 2004 16:34:30 +0000 (16:34 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 13 Apr 2004 16:34:30 +0000 (16:34 +0000)
gpsbabel/gpx.c

index 95ea894bc0abab48d3ddae91586a4dee500df66f..3f141638f73a32a4767845e3c7cf1caec98b54a6 100644 (file)
@@ -802,7 +802,9 @@ gpx_rd_init(const char *fname)
         * this across reads and we unlock the safety belt from the 
         * leak tester.
         */
-       xsi_schema_loc = strdup(DEFAULT_XSI_SCHEMA_LOC);
+       if (!xsi_schema_loc) {
+               xsi_schema_loc = strdup(DEFAULT_XSI_SCHEMA_LOC);
+       }
        if (!xsi_schema_loc) {
                fatal("gpx: Unable to allocate %d bytes of memory.\n", strlen(DEFAULT_XSI_SCHEMA_LOC) + 1);
        }